package scenetracer.core.shader;

import scenetracer.SceneState;
import scenetracer.core.Primitive;
import scenetracer.image.Color;

public class MirrorShader extends Shader {
	
	Color refl;
	
	

	public Color getRefl() {
		return refl;
	}

	public void setRefl(Color refl) {
		this.refl = refl;
	}
	
	/*
	public void shade(SceneState state) {	
		dir = state.getRay().getDirection(); 
		state.getColor().mul(refl);
		state.getReflectionColor().mul(refl);
	}
	 */

	

	@Override
	public void setPrim(Primitive primitive) {
		primitive.setReflectionK(1f);		
	}
	
	
	@Override
	public void shade(SceneState state) {	
		state.getColor().mul(refl);
		state.getReflectionColor().mul(refl);
		
	}
	
	
	
	public MirrorShader(String name) {
		super(name);
		this.type = "mirror";
	}
	
}
